-
Notifications
You must be signed in to change notification settings - Fork 0
[Feat] 알림 페이지 제작 #117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feat] 알림 페이지 제작 #117
Conversation
🎨 Storybook Reportℹ️ Story 변경사항이 감지되지 않았습니다 이 PR에는 Story 변경이 없어서 빌드를 스킵했습니다.
|
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
📊 Coverage Report
📉 #117을 main에 병합하면 coverage가 Coverage 요약@@ Coverage Diff @@
## main #117 +/- ##
===========================================
- Coverage 31.34% 29.52% -1.82%
===========================================
Files 105 113 +8
Lines 4252 4515 +263
Branches 201 209 +8
===========================================
Hits 1333 1333 0
+ Misses 2919 3182 +263 영향받은 파일✅ 이 PR로 영향받은 파일이 없습니다 수정된 모든 파일이 현재 coverage를 유지했습니다. |
🚀 PR Preview Report✨ Build가 성공적으로 완료되었습니다. Preview에서 변경사항을 확인하세요.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SSE 돌아가는 방식이 이런 흐름이군요!
머리로는 이해했지만 작성은 못하겠는 그런..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
어차피 해당 구문은 백엔드분들이 담당하실 내용이니까, 가볍게 넘기셔도 될 것 같아요!
클라이언트에서 서버에 접속할 때 사용하는 구문이 좀 더 중요하겠네요 :)
useEffect(() => {
const eventSource = new EventSource('/api/notifications/stream');
eventSource.onmessage = (event) => {
const data: Notification = JSON.parse(event.data);
setMessages((prev) => [...prev, data]);
};
eventSource.onerror = (err) => {
console.error('SSE 에러', err);
eventSource.close();
};
return () => {
eventSource.close();
};
}, []);
wooktori
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다!
📝 변경 사항
src/app/notification/page.tsxsrc/components/pages/notification/notification-card/index.tsxsrc/lib/format-time-ago.tssrc/app/api/notifications/stream/route.tsuseNotificationhook 제작🔗 관련 이슈
Closes #47
🧪 테스트 방법
📸 스크린샷 (선택)
📋 체크리스트
💬 추가 코멘트
CodeRabbit Review는 자동으로 실행되지 않습니다.
Review를 실행하려면 comment에 아래와 같이 작성해주세요